import request from '@/utils/request'


let BASE_ADDRESS = '/base/position'
// --------  角色设定 --------
// 添加角色
export const getPositionListApi = (data) => {
    return request({
        url: `${BASE_ADDRESS}/list`,
        method: 'get',
        params: data
    })
}

//id查询
export const getPositionEditApi = (data) => {
    return request({
        url: `${BASE_ADDRESS}/edit`,
        method: 'put',
        data: data
    })
}
// id查询
export const getPositionGetInfoApi = (data) => {
    return request({
        url: `${BASE_ADDRESS}/getInfo`,
        method: 'get',
        params: data
    })
}

// 按id查询多个角色
export const getPositionGetMultiInfoApi = (data) => {
    return request({
        url: `${BASE_ADDRESS}/getMultiInfo`,
        method: 'get',
        params: data
    })
}


//删除角色 🧨最后的url是角色的id
export const getPositionRemoveApi = (data) => {
    return request({
        url: `${BASE_ADDRESS}/remove`,
        method: 'delete',
        data: data
    })
}
// 添加
export const getPositionAddApi = (data) => {
    return request({
        url: `${BASE_ADDRESS}/add`,
        method: 'post',
        data: data
    })
}